package edu.po.au.server.domain;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Version;
import javax.jdo.annotations.VersionStrategy;


@PersistenceCapable(detachable="true")
@Version(strategy=VersionStrategy.VERSION_NUMBER, column="VERSION", 
				extensions={@Extension (vendorName="datanucleus", key="field-name", value="version")})
public class Product {
	
  public final static String PRODUCT_Id = "productId";  
  public final static String PRODUCT_TEXT = "productText";
  public final static String CATEGORY_TEXT = "categoryText";
	
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;
  
  @Persistent 
	private Long productId;
	
  @Persistent 
	private String productText;

  @Persistent 
	private String categoryId;

  @Persistent 
	private String categoryText;
    
  @Persistent
  private String productDescription;
  
  @Persistent 
	private Long version;
	
	public Product(){
		super();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public String getProductText() {
		return productText;
	}

	public void setProductText(String productText) {
		this.productText = productText;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getCategoryText() {
		return categoryText;
	}

	public void setCategoryText(String categoryText) {
		this.categoryText = categoryText;
	}

	
	public String getProductDescription() {
		return productDescription;
	}

	
	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}

	
}
